package com.bajiao.vo.order;

import com.alibaba.fastjson.annotation.JSONField;
import com.bajiao.common.aspect.annotation.Dict;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("RefundOrderAdmin")
public class RefundOrderAdmin {

    private String id;

    @Excel(name = "退款单号", width = 30)
    private String refundOrderNo;

    @Excel(name = "订单编号", width = 30)
    private String orderNo;

    @Excel(name = "用户昵称", width = 30)
    private String nickname;

    @Excel(name = "用户手机号", width = 30)
    private String mobile;

    @Dict(dictTable ="tb_store",dicText = "title",dicCode = "id")
    @Excel(name = "店铺名称", width = 30, dictTable = "tb_store",dicCode = "id",dicText = "title")
    private String storeId;

    @ExcelCollection(name = "商品详情")
    private List<OrderDetailsAdmin> orderDetails;

    @ApiModelProperty("支付金额")
    private BigDecimal payPrice;

    @ApiModelProperty("状态 0-待审核 1-已退款 2-退款中 3-微信退款失败 9-驳回")
    private Integer status;

    @ApiModelProperty("退款金额")
    private BigDecimal refundPrice;

    @ApiModelProperty("下单时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下单时间", width = 30, format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("退款原因")
    private String reason;

    @Excel(name = "支付方式", width = 15, replace = {"余额_1","微信_2"}, needMerge = true)
    private Integer payType;
}
